package com.zx.sp_mybatisplus_smbms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zx.sp_mybatisplus_smbms.pojo.SmbmsProvider;
import com.zx.sp_mybatisplus_smbms.service.SmbmsProviderService;
import com.zx.sp_mybatisplus_smbms.mapper.SmbmsProviderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author lenovo
* @description 针对表【smbms_provider】的数据库操作Service实现
* @createDate 2021-12-28 16:27:55
*/
@Service
public class SmbmsProviderServiceImpl extends ServiceImpl<SmbmsProviderMapper, SmbmsProvider>
    implements SmbmsProviderService{

    @Autowired
    private SmbmsProviderMapper smbmsProviderMapper;

    @Override
    @Transactional(readOnly = true)
    public List<SmbmsProvider> findAllProvider() {
        return smbmsProviderMapper.findAllProvider();
    }

    @Override
    @Transactional
    public boolean addProvider(SmbmsProvider smbmsProvider) {
        return smbmsProviderMapper.addProvider(smbmsProvider);
    }

    @Override
    @Transactional
    public boolean delProvider(Long id) {
        return smbmsProviderMapper.delProvider(id);
    }

    @Override
    @Transactional
    public boolean updateProvider(SmbmsProvider smbmsProvider) {
        return smbmsProviderMapper.updateProvider(smbmsProvider);
    }

    @Override
    @Transactional(readOnly = true)
    public SmbmsProvider findProviderById(Long id) {
        return smbmsProviderMapper.findProviderById(id);
    }

    @Override
    @Transactional(readOnly = true)
    public List<SmbmsProvider> findproviderListByPronameAndCreatedby(String proname, Long createdby) {
        return smbmsProviderMapper.findproviderListByPronameAndCreatedby(proname,createdby);
    }
}







